package com.gongj.circularDependencies;

import com.gongj.circularDependencies.dto.A;
import com.gongj.circularDependencies.dto.B;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {
	public static void main(String[] args) {
//		AnnotationConfigApplicationContext context =
//				new AnnotationConfigApplicationContext(CircularApp.class);

		ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("circularDependencies.xml");
		A a = (A)context.getBean("a");
		a.test();

		//AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(CircularApp.class);
		//A a = (A)context.getBean("a");
		//B b = (B)context.getBean("b");
		//a.test();
	}
}
